package cn.ante.basic.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Getter
/**
* @Description: 分页查询条件类
* @Author: Nai
* @Version: 1.0
* @Date:  2022/6/21 18:47
*/
public class BaseQuery {
    private Integer currentPage = 1 ;

    private Integer pageSize = 5 ;

    private String keyword;

    private Long parentId;

    /*
    * @Title: getStart
    * @Description: 起始页方法
    * @Author: Nai
    * @Version: 1.0
    * @Date:  2022/6/21 18:47
    * @Parameters: []
    * @Return java.lang.Integer
    */
    public Integer getStart(){
        return (this.currentPage - 1)* this.pageSize;
    }



}
